﻿var $dxrConfig = (function (config) {

    config.iacs = (function (iacs) {

        iacs.information = (function (source) {
            source.host = '/';
            source.search = function (http, condition, pageIndex, pageSize, success, error) {
                var url = source.host + 'api/iacs/information/FullTextSearch?pageIndex=' + pageIndex + '&pageSize=' + pageSize;
                $dxr.request(http, url, condition, "post", success, error);
            };
            source.post = function (http, data, success, error) {
                var url = source.host + 'api/iacs/information/post';
                $dxr.request(http, url, data, "post", success, error);
            };
            source.query = function (http, condition, pageIndex, pageSize, success, error) {
                var url = source.host + 'api/iacs/information/query?pageIndex=' + pageIndex + '&pageSize=' + pageSize;
                $dxr.request(http, url, condition, "post", success, error);
            };
            source.delete = function (http, id, success, error) {
                var url = source.host + 'api/iacs/information/delete/' + id;
                $dxr.request(http, url, {}, "delete", success, error);
            };
            return source;
        }(iacs.information || {}));

        iacs.common = (function (source) {
            source.host = '/';
            source.enum = function (http, type, success, error) {
                var url = source.host + 'api/iacs/common/Enum?type=' + type;
                $dxr.request(http, url, {}, "get", success, error);
            };
            return source;
        }(iacs.common || {}));

        return iacs;
    }(config.iacs || {}));

    return config;
}($dxrConfig || {}));